﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.master" AutoEventWireup="true"
    CodeFile="DMLinkDownload.aspx.cs" Inherits="Admin_DanhMuc_DMTepTin" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Assembly="CuteWebUI.AjaxUploader" Namespace="CuteWebUI" TagPrefix="cc1" %>
<%@ Register Assembly="PagerControl" Namespace="CutePager" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="HomePlaceHolder" runat="Server">
    <div class="hrm_header_placeholder">
        Danh mục Tệp Tin
        <div>
            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                <ContentTemplate>
                    <div style="padding: 10px">
                        <asp:HiddenField ID="H_CatalogId" Value="0" runat="server" />
                        <asp:HiddenField ID="H_FileName" Value="0" runat="server" />
                        <asp:Panel ID="PanelAdd" Width="100%" GroupingText="Cập nhật thông tin" runat="server">
                            <table border="0" width="100%" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td colspan="4" height="10">
                                    </td>
                                </tr>
                                <tr>
                                    <td width="20">
                                    </td>
                                    <td width="110" class="hrm_title_blue">
                                    </td>
                                    <td width="7" class="hrm_title_blue">
                                    </td>
                                    <td>
                                        <asp:Label ID="lblStatus" ForeColor="Red" runat="server" Text=""></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="4" height="4">
                                    </td>
                                </tr>
                                <tr>
                                    <td width="20">
                                    </td>
                                    <td width="110" class="hrm_title_blue">
                                        Tên Tệp Tin
                                    </td>
                                    <td width="7" class="hrm_title_blue">
                                        :
                                    </td>
                                    <td>
                                        <asp:Label ID="lblFileDinhKem" runat="server" Text=""></asp:Label>
                                        <asp:HiddenField ID="HiddenField1" Value="" runat="server" />
                                        <asp:HiddenField ID="H_FileChonLai" Value="" runat="server" />
                                        <cc1:UploadAttachments runat="server" CancelButtonStyle-CssClass="hrm_button" InsertButtonStyle-CssClass="hrm_button"
                                            ShowCheckBoxes="False" MultipleFilesUpload="true" ID="UploadFile" InsertText="Chọn tập tin"
                                            CancelAllMsg="Hủy tất cả" UploadingMsg="...Đang tải tập tin..." OnFileUploaded="UploadFile_FileUploaded"
                                            OnAttachmentRemoveClicked="UploadFile_AttachmentRemoveClicked" RemoveButtonText="Xóa">
                                        </cc1:UploadAttachments>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="4" height="4">
                                    </td>
                                </tr>
                                <tr>
                                    <td width="20">
                                    </td>
                                    <td width="110" class="hrm_title_blue">
                                    </td>
                                    <td width="7" class="hrm_title_blue">
                                    </td>
                                    <td>
                                        <asp:ImageButton ID="cmdSave" ImageUrl="~/Images/save.jpg" runat="server" OnClick="cmdSave_Click" />
                                        <asp:ImageButton ID="cmdReset" CausesValidation="false" ImageUrl="~/Images/huy.jpg"
                                            runat="server" OnClick="cmdReset_Click" />
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="4" height="8">
                                    </td>
                                </tr>
                            </table>
                        </asp:Panel>
                        <asp:Panel ID="PanelList" Width="100%" Height="355" GroupingText="Danh sách" runat="server">
                            <table border="0" width="100%" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td width="20">
                                    </td>
                                    <td style="padding-right: 15px">
                                        <asp:Panel ID="PanelGrid" Width="100%" runat="server">
                                            <br />
                                            <asp:GridView ID="gridCatalog" runat="server" DataKeyNames="Id" Width="100%" BackColor="White"
                                                OnRowCommand="gridCatalog_RowCommand" OnRowDataBound="gridCatalog_RowDataBound"
                                                OnRowDeleting="gridCatalog_RowDeleting" EmptyDataText="<br><center>Không tồn tại dữ liệu</center><br>"
                                                BorderColor="#CCCCCC" AutoGenerateColumns="false" BorderStyle="Solid" BorderWidth="1px"
                                                CellPadding="3">
                                                <Columns>
                                                    <asp:BoundField DataField="id" Visible="false" HeaderText="id"></asp:BoundField>
                                                    <asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="7%">
                                                        <ItemTemplate>
                                                            <asp:LinkButton ID="cmdSelect" runat="server" CssClass="command_button" CausesValidation="false"
                                                                Text="Select" CommandName="Select" CommandArgument='<%# Eval("Id") %>'>Select</asp:LinkButton>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="7%">
                                                        <ItemTemplate>
                                                            <asp:LinkButton ID="cmdDelete" runat="server" CssClass="command_button" CausesValidation="false"
                                                                Text="Delete" CommandName="Delete" CommandArgument='<%# Eval("id") %>'>Delete</asp:LinkButton>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:BoundField DataField="TenTepTin" ItemStyle-Width="20%" HeaderText="Tên Tệp Tin">
                                                    </asp:BoundField>
                                                    <asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center"
                                                        HeaderText="Ngày cập nhật" ItemStyle-Width="90">
                                                        <ItemTemplate>
                                                            <asp:Label ID="LabelNgayCapNhat" runat="server" Text='<%# Convert.ToDateTime(Eval("NgayCapNhat")).ToString("dd/MM/yyyy")%>'></asp:Label>
                                                        </ItemTemplate>
                                                        <ItemStyle HorizontalAlign="Center" Width="12%" />
                                                    </asp:TemplateField>
                                                </Columns>
                                                <RowStyle ForeColor="#000066" />
                                                <SelectedRowStyle BackColor="#dedfdf" Font-Bold="True" ForeColor="Gray" />
                                                <HeaderStyle BackColor="#006699" Font-Bold="True" HorizontalAlign="Left" ForeColor="White" />
                                            </asp:GridView>
                                        </asp:Panel>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2" height="10">
                                        &nbsp;
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2" height="10">
                                        <cc1:Pager ID="Pager1" runat="server" PreviousClause="" NextClause="" LastClause=""
                                            FirstClause="" PageClause="Trang" OfClause="/" PageSize="10" OnCommand="Pager1_Command">
                                        </cc1:Pager>
                                    </td>
                                </tr>
                            </table>
                        </asp:Panel>
                    </div>
                </ContentTemplate>
            </asp:UpdatePanel>
</asp:Content>
